#include <stdio.h>    
  
int n, i, fact = 1;  
  
void fun1(int n) 
{  
    i = 0;  
    while(i<=n-1)
	{  
        fact *= i + 1;//fact=fact*(i+1)    
        i++;    
    }    
    printf("%d! = %d\n", n, fact);    
    float e = 1.0 + 1.0 / fact;  
    printf("%f\n", e);  
}  
  
int main() 
{  
    int num;  
    printf("Enter a number: ");    
    scanf("%d", &num);  
    fun1(num);  
    return 0;  
}
